from django.conf.urls import url
from app01 import views

urlpatterns = [
    url(r'^login/$', views.login, name="login"),
    url(r'^logout/$', views.logout, name="logout"),
    url(r'^index/$', views.index, name="index"),
    # 注册
    url(r'^register/$', views.register, name="register"),
    # 文章
    url(r'^article/(\d+)$', views.article, name="article"),

    # 文章管理
    url(r'^article_list/$', views.article_list, name="article_list"),
    # 新增文章
    url(r'^article_add/$', views.article_add, name="article_add"),
    # 编辑文章
    url(r'^article_edit/(\d+)$', views.article_edit, name="article_edit"),
    # 删除文章
    url(r'^article_del/(\d+)$', views.article_del, name="article_del"),

    # 文章分类
    url(r'^category_list/$', views.category_list, name="category_list"),
    # 把add和edit合成到一个函数和一个html
    url(r'^category_add/$', views.category_change, name="category_add"),
    url(r'^category_edit/(\d+)$', views.category_change, name="category_edit"),
    # 删除分类
    url(r'^category_del/(\d+)$', views.category_del, name="category_del"),
    # 评论
    url(r'^comment/$', views.comment, name="comment"),

    # 系列的管理
    url(r'^series_list/$', views.series_list, name="series_list"),
    # 编辑和删除写到一起
    url(r'^series_add/$', views.series_change, name="series_add"),
    url(r'^series_edit/(\d+)$', views.series_change, name="series_edit"),
    # 删除系列
    url(r'^series_del/(\d+)$', views.series_del, name="series_del"),

    # 进度
    url(r'^profile/$', views.profile, name="profile"),
    # 积分
    url(r'^point/$', views.point, name="point"),
    # 个人中心
    url(r'^backend/$', views.backend, name="backend"),
    url(r'^user_list/$', views.user_list, name="user_list"),
]
